/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package javaboken;
/**
 *
 * @author Bertil
 */
public class kap213_3{
Card kort = new Card("King", Card.suit.HEARTS, 10);
public String output = kort.printCard();

    public void echo(){
        System.out.println(output);
    }


}

class Card{


    public enum suit{
        HEARTS, SPADES, CLUBS, DIAMONDS
    }
    private suit suit;
    private String face;
    private int value;

    public Card(String in_face, suit in_suit, int in_value){
        face = in_face;
        suit = in_suit;
        value = in_value;
    }

    public suit readCol(){
        return suit;
    }

    public String readFace(){
        return face;
    }

    public int readVal(){
        return value;
    }

    public String printCard(){
        String cardText = face + " of " + suit + " is worth " + value;
        return cardText;
    }
}
